<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="icon" href="${favicon!''}" type="image/x-icon">
    <link rel="shortcut icon" href="${favicon!''}" type="image/x-icon">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title><#if tag??>${tag.name}<#else>标签</#if> - ${title!''}</title>
    <link rel="stylesheet" href="${una}/${theme}/css/font-awesome.css">
    <link rel="stylesheet" href="${una}/${theme}/css/ionicons.css">
    <link rel="stylesheet" href="${una}/${theme}/css/adminlte.css">
    <link rel="stylesheet" href="${una}/${theme}/css/unaboot.css">
</head>
<body>
<div class="sidebar animated fadeInDown">
    <#include "./left.html"/>
</div>
<div class="main">
    <div class="page-top animated fadeInDown">
        <#include "./nav.html"/>
    </div>
    <div class="autopagerize_page_element">
        <div class="content">
            <div class="tag-row">
                <div class="tag-box m-4">
                    <span class="hd l">标签:</span>
                    <div class="bd">
                        <ul class="">
                            <#if tag??>
                                <li class="tag-nav-item">
                                    <a href="${una}/category/tags">全部</a>
                                </li>
                                <@unaboot.tags>
                                    <#if results?? && results?size gt 0>
                                        <#list results as t>
                                            <#if t.id == tag.id>
                                                <li class="tag-nav-item on">
                                                    <a href="${una}/tags/${t.slug}">${t.name}</a>
                                                </li>
                                            <#else>
                                                <li class="tag-nav-item">
                                                    <a href="${una}/tags/${t.slug}">${t.name}</a>
                                                </li>
                                            </#if>
                                        </#list>
                                    </#if>
                                </@unaboot.tags>
                            <#else>
                                <li class="tag-nav-item on">
                                    <a href="${una}/category/tags">全部</a>
                                </li>
                                <@unaboot.tags>
                                    <#if results?? && results?size gt 0>
                                        <#list results as t>
                                            <li class="tag-nav-item">
                                                <a href="${una}/tags/${t.slug}">${t.name}</a>
                                            </li>
                                        </#list>
                                    </#if>
                                </@unaboot.tags>
                            </#if>
                        </ul>
                    </div>
                </div>
            </div>
            <#if tag??>
                <@unaboot.pages id=tag.id offset=offset type=2>
                    <#if results?? && results.content?size gt 0>
                        <#list results.content as post>
                            <div class="post animated fadeInDown">
                                <div class="post-title mb-2">
                                    <h3>
                                        <a href="${una}/posts/${post.slug}">${post.title}</a>
                                    </h3>
                                </div>
                                <div class="post-content">
                                    <div class="p_part">
                                        <p>${post.summary}</p>
                                    </div>
                                </div>
                                <div class="post-footer">
                                    <div class="meta">
                                        <div class="info">
                                            <i class="fa fa-sun-o"></i>
                                            <span class="date">${post.createTime?string("yyyy-MM-dd HH:mm")}</span>
                                            <i class="fa fa-user-circle-o"></i>
                                            <a href="#">${post.author}</a>
                                            <i class="fa fa-tags"></i>
                                            <@unaboot.tags id=post.id>
                                                <#if results?? && results?size gt 0>
                                                    <#list results as t>
                                                        <a href="${una}/tags/${t.slug}" class="tag"> ${t.name}</a>
                                                    </#list>
                                                </#if>
                                            </@unaboot.tags>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </#list>
                    </#if>
                </@unaboot.pages>
                <div class="pagination">
                    ${unaboot.pageUrl(una+"/tags/"+tag.slug tag.id offset 5 15 2)}
                </div>
            <#else>
                <@unaboot.pages id=0 offset=offset type=0>
                    <#if results?? && results.content?size gt 0>
                        <#list results.content as post>
                            <div class="post animated fadeInDown">
                                <div class="post-title mb-2">
                                    <h3>
                                        <a href="${una}/posts/${post.slug}">${post.title}</a>
                                    </h3>
                                </div>
                                <div class="post-content">
                                    <div class="p_part">
                                        <p>${post.summary}</p>
                                    </div>
                                </div>
                                <div class="post-footer">
                                    <div class="meta">
                                        <div class="info">
                                            <i class="fa fa-sun-o"></i>
                                            <span class="date">${post.createTime?string("yyyy-MM-dd HH:mm")}</span>
                                            <i class="fa fa-user-circle-o"></i>
                                            <a href="#">${post.author}</a>
                                            <i class="fa fa-tags"></i>
                                            <@unaboot.tags id=post.id>
                                                <#if results?? && results?size gt 0>
                                                    <#list results as t>
                                                        <a href="${una}/tags/${t.slug}" class="tag"> ${t.name}</a>
                                                    </#list>
                                                </#if>
                                            </@unaboot.tags>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </#list>
                    </#if>
                </@unaboot.pages>
                <div class="pagination">
                    ${unaboot.pageUrl(una+"/tags/"+tag.slug 0 offset 5 15 0)}
                </div>
            </#if>

        </div>
    </div>
</div>
<script src="${una}/${theme}/js/jquery/jquery.min.js"></script>
<script src="${una}/${theme}/js/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="${una}/${theme}/js/adminlte.min.js"></script>
<script type="text/javascript">

</script>
</body>
</html>
